﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zj.OpenAuth.DTO.Common;

namespace Zj.OpenAuth.App.DepartmentApp
{
    /// <summary>
    /// department application service interface 
    /// </summary>
    public interface IDepartmentAppService
    {
        /// <summary>
        /// get by id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        DepartmentDTO Get(int id);



        /// <summary>
        /// get all list
        /// </summary>
        /// <returns></returns>
        List<DepartmentDTO> GetAllList();



        /// <summary>
        /// get children by parent
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<DepartmentDTO> GetChildrenByParent(int? id, int pageIndex, out int rowCount, int pageSize = 10);



        /// <summary>
        /// add  or eidt department
        /// </summary>
        /// <returns></returns>
        bool AddOrEdit(DepartmentDTO dto);



        /// <summary>
        /// delete by id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        void Delete(int id);



        /// <summary>
        /// delete ids
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        void DeleteMuti(List<int> ids);
    }
}
